<link type="text/css" href="{$DOC_ROOT}modules/dec/static/css/report.css" rel="stylesheet"/>
<script type="text/javascript" src="{$DOC_ROOT}modules/dec/static/jscript/report.js"></script>
<div id="{$preffix}-report_container" class="dec_report">
	<form id="{$preffix}-report" name="report" method="POST" action="{$form_action}">
		<input type="hidden" name="preffix" value="{$preffix}" />
		<input type="hidden" id="{$preffix}-render" name="render" value="" />
		<input type="hidden" id="{$preffix}-column_manager" name="column_manager" value="" />
		<div class="report_img_container">
			{if isset($filter)}
			<img src="{$DOC_ROOT}modules/dec/static/images/report/search.png" alt="{__ t="Filter"}" onclick="toogle_filter('{$preffix}')" />
			{/if}
			{if $columns_manager==true}
			<img src="{$DOC_ROOT}modules/dec/static/images/report/columns.png" alt="{__ t="Manager Columns"}" onclick="toogle_columns('{$preffix}')" />
			{/if}
			{if $export_to_csv==true}
			<img src="{$DOC_ROOT}modules/dec/static/images/report/csv.png" alt="{__ t="Export To CSV"}" onclick="export_to_csv('{$preffix}')" />
			{/if}
			{if $export_to_pdf==true}
			<img src="{$DOC_ROOT}modules/dec/static/images/report/pdf.png" alt="{__ t="Export To PDF"}" onclick="export_to_pdf('{$preffix}')" />
			{/if}
		</div>
		{if isset($filter)}
		<div id="{$preffix}-filter" class="filter">
			{$filter}
		</div>
		{/if}
		<div id="{$preffix}-columns" class="columns">
			<fieldset>
				<legend>{__ t="Select the columns you want to show"}</legend>
				<select id="{$preffix}-column_manager" name="column_manager[]" class="column_manager" multiple=multiple>
					{html_options options=$columns_values selected=$columns_selected multiple=true}
				</select>
				<input type="button" onclick="save_selected_columns('{$preffix}')" value="{__ t='Apply'}" />
			</fieldset>
		</div>
		<div id="{$preffix}-report_content">
			{$middle}
		</div>
	</form>
</div>